import java.util.Scanner;

public class Shuixianhua {
    public static void main (String[] args)
    {   int a;
        Scanner reader=new Scanner(System.in) ;
        System.out.println("请输入一个整数:");
         a=reader.nextInt();
        int ge=a%10;
        int shi=a/10%10;
        int bai=a/10/10%10;
        int sum=ge+shi+bai;
        System.out.println(sum);
    }

}
